From: Alynx Zhou Date: Fri, 20 Jun 2025 15:05:28 +0000 (+0800) Subject: keyring: Allow user to correct password after checking failed X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~119^2~13^2^2~8 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=9bbc04e2322638e2fffacc769783267540ce1dca;p=gnome-shell.git keyring: Allow user to correct password after checking failed Currently we make entries and buttons insensitive and do some checks before calling the GcrPrompt implementation to complete. However, if checks get failed, for example, new passwords mismatched due to typo, we should make entries and buttons sensitive again to allow user to correct it. Part-of: (cherry picked from commit 889a46670d81fbbdf6c856e16094617ead4ca035) --- diff --git a/js/ui/components/keyring.js b/js/ui/components/keyring.js index 433535e9d..3044d0ad0 100644 --- a/js/ui/components/keyring.js +++ b/js/ui/components/keyring.js @@ -173,7 +173,12 @@ class KeyringDialog extends ModalDialog.ModalDialog { _onContinueButton() { this._updateSensitivity(false); - this.prompt.complete(); + if (this.prompt.complete()) + return; + // Allow user to correct it when passwords mismatch. + this._updateSensitivity(true); + if (this.prompt.password_visible) + this._passwordEntry.grab_key_focus(); } _onCancelButton() {